﻿<%@ Page Title="" Language="C#" MasterPageFile="~/site.Master" AutoEventWireup="true" CodeBehind="QuanLyNhanVien.aspx.cs" Inherits="QLHieuThuocFull.QuanLyNhanVien" %>

<%@ Register Assembly="DevExpress.Web.v14.1, Version=14.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxTabControl" TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.v14.1, Version=14.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v14.1, Version=14.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v14.1, Version=14.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxFormLayout" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <dx:ASPxTabControl ID="ASPxTabControl1" runat="server" ActiveTabIndex="0" 
        Theme="Metropolis">
        <Tabs>
            <dx:Tab Text="Nhân viên">
            </dx:Tab>
        </Tabs>
    </dx:ASPxTabControl>
    <dx:ASPxGridView ID="grid" runat="server" AutoGenerateColumns="False" 
        DataSourceID="NhanVienLinqDataSource" EnableTheming="True" KeyFieldName="MANV" 
        PreviewFieldName="HOTENNV" Theme="Metropolis" 
        onrowinserting="grid_RowInserting" 
    onrowupdating="ASPxGridView1_RowUpdating" Width="70%">
        <Columns>
            <dx:GridViewCommandColumn 
                ShowClearFilterButton="True" ShowDeleteButton="True" ShowEditButton="True" 
                ShowInCustomizationForm="True" ShowNewButtonInHeader="True" 
                VisibleIndex="0">
            </dx:GridViewCommandColumn>
            <dx:GridViewDataTextColumn Caption="Mã NV" FieldName="MANV" 
                ShowInCustomizationForm="True" VisibleIndex="1">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Họ Tên" FieldName="HOTENNV" 
                ShowInCustomizationForm="True" VisibleIndex="2">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Giới tính" FieldName="GIOITINH" 
                ShowInCustomizationForm="True" VisibleIndex="3">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Địa chỉ" FieldName="DIACHI" 
                ShowInCustomizationForm="True" VisibleIndex="6">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Điện thoại" FieldName="DIENTHOAI" 
                ShowInCustomizationForm="True" VisibleIndex="7">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Tên loại NV" FieldName="TENLOAINV" 
                ShowInCustomizationForm="True" VisibleIndex="8">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Tên đăng nhập" FieldName="TENDN" 
                ShowInCustomizationForm="True" VisibleIndex="9">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Mật khẩu" FieldName="MATKHAU" 
                ShowInCustomizationForm="True" VisibleIndex="10">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataDateColumn Caption="Ngày sinh" FieldName="NGAYSINH" 
                ShowInCustomizationForm="True" VisibleIndex="5">
                <PropertiesDateEdit DisplayFormatString="">
                </PropertiesDateEdit>
            </dx:GridViewDataDateColumn>
        </Columns>
      
        <Settings ShowFilterRow="True" />

<Settings ShowFilterRow="True"></Settings>

        <Templates>
            <EditForm>
                <dx:ASPxFormLayout ID="formLayout" runat="server" ColCount="4" AlignItemCaptionsInAllGroups="True" 
                 >
                    <Items>
                        <dx:LayoutItem FieldName="MANV">
                            <LayoutItemNestedControlCollection>
                                <dx:LayoutItemNestedControlContainer runat="server">
                                    <dx:ASPxTextBox ID="formLayout_E1" runat="server" Width="170px" 
                                        Text='<%# Eval("MANV") %>'>
                                    </dx:ASPxTextBox>
                                </dx:LayoutItemNestedControlContainer>
                            </LayoutItemNestedControlCollection>
                        </dx:LayoutItem>
                        <dx:LayoutItem FieldName="HOTENNV">
                            <LayoutItemNestedControlCollection>
                                <dx:LayoutItemNestedControlContainer runat="server">
                                    <dx:ASPxTextBox ID="formLayout_E2" runat="server" Width="170px" Text='<%# Eval("HOTENNV") %>'>
                                    </dx:ASPxTextBox>
                                </dx:LayoutItemNestedControlContainer>
                            </LayoutItemNestedControlCollection>
                        </dx:LayoutItem>
                        <dx:LayoutItem FieldName="GIOITINH">
                            <LayoutItemNestedControlCollection>
                                <dx:LayoutItemNestedControlContainer runat="server">
                                    <dx:ASPxTextBox ID="formLayout_E3" runat="server" Width="170px" Text='<%# Eval("GIOITINH") %>'>
                                    </dx:ASPxTextBox>
                                </dx:LayoutItemNestedControlContainer>
                            </LayoutItemNestedControlCollection>
                        </dx:LayoutItem>
                        <dx:LayoutItem FieldName="NGAYSINH">
                            <LayoutItemNestedControlCollection>
                                <dx:LayoutItemNestedControlContainer runat="server">
                                    <dx:ASPxDateEdit ID="formLayout_E4" runat="server" 
                                        Value='<%# Eval("NGAYSINH") %>'>
                                    </dx:ASPxDateEdit>
                                </dx:LayoutItemNestedControlContainer>
                            </LayoutItemNestedControlCollection>
                        </dx:LayoutItem>
                        <dx:LayoutItem FieldName="DIACHI">
                            <LayoutItemNestedControlCollection>
                                <dx:LayoutItemNestedControlContainer runat="server">
                                    <dx:ASPxTextBox ID="formLayout_E5" runat="server" Width="170px" 
                                        Text='<%# Eval("DIACHI") %>'>
                                    </dx:ASPxTextBox>
                                </dx:LayoutItemNestedControlContainer>
                            </LayoutItemNestedControlCollection>
                        </dx:LayoutItem>
                        <dx:LayoutItem FieldName="DIENTHOAI">
                            <LayoutItemNestedControlCollection>
                                <dx:LayoutItemNestedControlContainer runat="server">
                                    <dx:ASPxTextBox ID="formLayout_E6" runat="server" Width="170px" 
                                        Text='<%# Eval("DIENTHOAI") %>'>
                                    </dx:ASPxTextBox>
                                </dx:LayoutItemNestedControlContainer>
                            </LayoutItemNestedControlCollection>
                        </dx:LayoutItem>
                        <dx:LayoutItem FieldName="TENLOAINV">
                            <LayoutItemNestedControlCollection>
                                <dx:LayoutItemNestedControlContainer runat="server">
                                    <dx:ASPxTextBox ID="formLayout_E7" runat="server" 
                                        Text='<%# Eval("TENLOAINV") %>' Width="170px">
                                    </dx:ASPxTextBox>
                                </dx:LayoutItemNestedControlContainer>
                            </LayoutItemNestedControlCollection>
                        </dx:LayoutItem>
                        <dx:LayoutItem FieldName="TENDN">
                            <LayoutItemNestedControlCollection>
                                <dx:LayoutItemNestedControlContainer runat="server">
                                    <dx:ASPxTextBox ID="formLayout_E8" runat="server" Width="170px" Text='<%# Eval("TENDN") %>'>
                                    </dx:ASPxTextBox>
                                </dx:LayoutItemNestedControlContainer>
                            </LayoutItemNestedControlCollection>
                        </dx:LayoutItem>
                        <dx:LayoutItem FieldName="MATKHAU">
                            <LayoutItemNestedControlCollection>
                                <dx:LayoutItemNestedControlContainer runat="server">
                                    <dx:ASPxTextBox ID="formLayout_E9" runat="server" Width="170px" Text='<%# Eval("MATKHAU") %>'>
                                    </dx:ASPxTextBox>
                                </dx:LayoutItemNestedControlContainer>
                            </LayoutItemNestedControlCollection>
                        </dx:LayoutItem>
                    </Items>
                </dx:ASPxFormLayout>
                <div style="text-align: right; padding: 2px">
                        <dx:ASPxGridViewTemplateReplacement ID="UpdateButton" ReplacementType="EditFormUpdateButton" runat="server" />
                        <dx:ASPxGridViewTemplateReplacement ID="CancelButton" ReplacementType="EditFormCancelButton" runat="server" />
                    </div>
            </EditForm>
        </Templates>
    </dx:ASPxGridView>
    <asp:LinqDataSource ID="NhanVienLinqDataSource" runat="server" 
        ContextTypeName="QLHieuThuocFull.QLDUOCTINDUCDataContext" 
        EnableDelete="True" EnableInsert="True" EnableUpdate="True" 
        TableName="NHANVIENs">
    </asp:LinqDataSource>
</asp:Content>
